module.exports = [
  {
    path: '/',
    name: 'entrance',
    meta: {},
    beforeEnter: (to, from, next) => {
      let condition = true
      if (condition) {
        next('/manage')
      } else {
        next('/login')
      }
    }
  },
  {
    path: '/login',
    name: 'login',
    meta: {},
    component: (resolve) => require(['@/components/login/login'], resolve),
    beforeEnter: (to, from, next) => {
      next()
    }
  },
  {
    path: '/manage',
    name: 'manage',
    meta: {},
    redirect: '/manage/index',
    component: (resolve) => require(['@/components/manage/manage'], resolve),
    beforeEnter: (to, from, next) => {
      next()
    },
    children: [
      {
        path: '/manage/index',
        name: 'manage_index',
        meta: {},
        component: (resolve) => require(['@/components/index/index'], resolve),
        beforeEnter: (to, from, next) => {
          next()
        }
      },
      {
        path: '/manage/clients/clients',
        name: 'manage_clients',
        meta: {},
        component: (resolve) => require(['@/components/clients/clients_manage'], resolve),
        beforeEnter: (to, from, next) => {
          next()  
        }
      },
      {
        path: '/manage/clients/labels',
        name: 'manage_labels',
        meta: {},
        component: (resolve) => require(['@/components/clients/labels_manage'], resolve),
        beforeEnter: (to, from, next) => {
          next()
        }
      },
      {
        path: '/manage/activities/plan',
        name: 'manage_activities_plan',
        meta: {},
        component: (resolve) => require(['@/components/activities/activities_plan'], resolve),
        beforeEnter: (to, from, next) => {
          next()
        }
      },
      {
        path: '/manage/activities/check',
        name: 'manage_activities_check',
        meta: {},
        component: (resolve) => require(['@/components/activities/activities_check'], resolve),
        beforeEnter: (to, from, next) => {
          next()
        }
      },
      {
        path: '/manage/activities/process',
        name: 'manage_activities_process',
        meta: {},
        component: (resolve) => require(['@/components/activities/activities_process'], resolve),
        beforeEnter: (to, from, next) => {
          next()
        }
      }
    ]
  }
]
